package com.zmn.plat.common.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 描述: KV通用结构（包含父级K,和children）
 *
 * @author guoqiao
 * @since 2021/5/28 10:03
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class KVDTO implements Serializable {

    private static final long serialVersionUID = -2452872597525404926L;

    @ApiModelProperty("key")
    private Integer key;

    @ApiModelProperty("value")
    private String value;

    @ApiModelProperty("父级key")
    private Integer parent;

    @ApiModelProperty("层级")
    private Integer level;

    @ApiModelProperty("下级实体")
    private List<KVDTO> children;

}
